---
title: "Server Manager"
description: "Server Manager API Documentation"
icon: "code"
github: "https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/managers/server_manager.py"
---

import {RandomGradientBackground} from "/snippets/gradient.jsx"

<Callout type="info" title="Source Code">
View the source code for this module on GitHub: <a href='https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/managers/server_manager.py' target='_blank' rel='noopener noreferrer'>https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/managers/server_manager.py</a>
</Callout>

## ServerManager

<div>
<RandomGradientBackground className="rounded-lg p-4 w-full h-full rounded-full">
<div className="text-black">
<div className="text-black font-bold text-xl mb-2 mt-8"><code className="!text-black">class</code> ServerManager</div>

</div>
</RandomGradientBackground>
```python
from mcp_use.managers.server_manager import ServerManager
```

<Card type="info">
### `method` __init__

Initialize the server manager.


**Parameters**
><ParamField body="client" type="mcp_use.client.client.MCPClient" required="True" >   The MCPClient instance managing server connections </ParamField>
><ParamField body="adapter" type="mcp_use.agents.adapters.base.BaseAdapter" required="True" >   The LangChainAdapter for converting MCP tools to LangChain tools </ParamField>

**Signature**
```python wrap
def __init__(client: mcp_use.client.client.MCPClient, adapter: mcp_use.agents.adapters.base.BaseAdapter):
```

</Card>
</div>
